package com.dkm.biz.gl.domain;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.dkm.base.core.helper.SpringHelper;
import com.dkm.biz.domain.AbstractDomain;
import com.dkm.biz.gl.persistence.dao.GlBytesDao;
import com.dkm.biz.gl.persistence.entity.GlBytesPo;

/**
 * 对象功能:c6_gl_bytes 领域对象实体
 * 开发公司:唯心六艺软件 - Craft6.cn
 * 开发人员:winston
 * 创建时间:2014-08-02 21:54:07
 */
@Service
@Scope("prototype")
public class GlBytes extends AbstractDomain<String, GlBytesPo>{
	 
	 private GlBytesDao glBytesDao = null;
	 
	protected void init(){
		glBytesDao = SpringHelper.getBean(GlBytesDao.class);
		setDao(glBytesDao);
	}	 
		
	public String saveBytes(byte[] bytes) {		
		getData().setBytes(bytes);
		save();
		return getData().getId();
	}
}
